db.dropDatabase();

db.createCollection("users");
db.createCollection("comment");
db.createCollection("diary");
db.createCollection("tips");
db.createCollection("notebooks");
db.createCollection("todos");
db.createCollection("images");
db.createCollection("ids");

db.notebooks.insert({name:"默认日记",owner:-1});
db.ids.insert({name:"users",id:1});
db.ids.insert({name:"diary",id:1});

db.users.insert({
    accounts:"test@tuer.me",
    id:0,
    created_at:new Date(),
    pwd:hex_md5("1234qwer"),
    nick:"admin",
    avatar:"",
    profile:'nothing yet',
    firends:[],
    isadmin:true,
    notebook:0,
    todocount:0,
    pageurl:'',
    tocommentcount:0,
    diarycount:0,
    emailnotallow:true,
    from:'app',
    disable:0,
    block:0
});
